package model.data;

/**
 * Datastore.java
 * Purpose: A generic storage facility for model objects.
 * Methods added here should be applicable to all model objects.
 * 
 * @author Hans Brems
 * @version 0.1 12/01/2012
 */

public interface DataStore<E> {

	/** Writes a new item */
	public void write(E entity) throws Exception;
	
	/** Updates an item */
	public void update(E entity) throws Exception;
	
	/** Deletes an item */
	public void delete(E entity) throws Exception;
	
	/** Returns the number of items in the data store */
	public int getCount() throws Exception;
}